package com.javandad.app.shared.entity.home;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.javandad.app.shared.entity.User;



@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "false")
public class HomePost implements Serializable {

	private static final long serialVersionUID = 5909211983859943148L;
	
	@SuppressWarnings("unused")
	private HomePost() {}
	public HomePost(String poster, String posted, String content,
			Date dateOfPost) {
		super();
		this.poster = poster;
		this.posted = posted;
		this.content = content;
		this.dateOfPost = dateOfPost;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getPoster() {
		return poster;
	}

	public void setPoster(String poster) {
		this.poster = poster;
	}

	public String getPosted() {
		return posted;
	}

	public void setPosted(String posted) {
		this.posted = posted;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getDateOfPost() {
		return dateOfPost;
	}

	public void setDateOfPost(Date dateOfPost) {
		this.dateOfPost = dateOfPost;
	}
	
	

	public User getPosterObj() {
		return posterObj;
	}
	public void setPosterObj(User posterObj) {
		this.posterObj = posterObj;
	}



	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	@Persistent
	private String poster;
	@Persistent
	private String posted;
	@Persistent
	private String content;
	@Persistent
	private Date dateOfPost;

	private User posterObj;
	
}

